/**
 * User: yd
 * Date: 2019/5/27
 * Time: 15:39
 **/
import Mock from "mockjs";
const Random = Mock.Random;
export const lists = (params)=>{
	//console.log(params)
	let Dbody = JSON.parse(params.body)
	let listData = [];
	let page = Dbody.page || 0;
	let pageSize = Dbody.pagesize || 10;
	let count = 1000;
	let len = (count - pageSize * (page - 1)) < pageSize ? (count - pageSize * (page - 1)) : pageSize;
	for(let i=0; i < len;i++){
		listData.push(Mock.mock({
			name: Random.cname(),
			imgs: Random.dataImage('80x80','头像'),
			date: Random.date() + ' ' + Random.time(),
			address: Random.province(),
		}))
	}
	return {
		lists:listData,
		num:1000
	};
}

